local liran = fk.CreateSkill{
  name = "rainveil__liran",
}

Fk:loadTranslationTable{
  ["rainveil__liran"] = "砺然",
  [":rainveil__liran"] = "每轮限一次，一个回合开始时，你可以依次摸三张牌，然后依次弃置三张牌，且若此流程中你的手牌数与体力值等量时，终止之。",

  ["$rainveil__liran1"] = "国朝倾覆，吾宁当为降虏乎！",
  ["$rainveil__liran2"] = "弃百姓之所仰，君子不为也。", 
}

liran:addEffect(fk.TurnStart, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(liran.name) and player:usedSkillTimes(liran.name, Player.HistoryRound) == 0
  end,
  on_use = function (self, event, target, player, data)
    local actions = {1,1,1,-1,-1,-1}
    local room = player.room
    for _, action in ipairs(actions) do
      if action == 1 then
        room:drawCards(player, 1)
        room:delay(200)
      else
        room:askToDiscard(player, {
          max_num = 1,
          min_num = 1,
          skill_name = liran.name,
          cancelable = false,
          include_equip = true, 
        })
      end
      if player.hp == player:getHandcardNum() then
        return
      end
    end
  end
})

return liran